package com.lk.service.Impl;

import com.lk.bean.Admin;
import com.lk.mapper.AdminMapper;
import com.lk.request.LoginRequest;
import com.lk.service.AdminService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {

    @Resource
    private AdminMapper adminMapper;

    @Override
    public Admin login(LoginRequest loginRequest) {
        Admin admin = adminMapper.login(loginRequest);
        return admin;
    }

    @Override
    public List<Admin> getAdminList(Admin admin) {
        return adminMapper.getAdminList(admin);
    }

    @Override
    public Admin findByName(String name) {
        return adminMapper.findByName(name);
    }

    @Override
    public int addAdmin(Admin admin) {
        return adminMapper.addAdmin(admin);
    }

    @Override
    public int updateAdmin(Admin admin) {
        return adminMapper.updateAdmin(admin);
    }

    @Override
    public int delete(Integer[] ids) {
        return adminMapper.delete(ids);
    }

    @Override
    public int updatePassWord(Integer id,String Password) {
        return adminMapper.updatePassWord(id,Password);
    }

}
